--
-- Description: script to create the Locales table.
-- Date created: 17 Apr 2008
--

set ANSI_NULLS on
set QUOTED_IDENTIFIER on
go

if not exists 
(
    select * 
    from dbo.sysobjects
    where id = object_id(N'[dbo].[Locales]')
    and objectproperty(id, N'IsUserTable') = 1
)
begin
    create table [dbo].[Locales]
    (
        [LocaleID] smallint not null
        , [LocaleCode] varchar(15) not null
        , [LocaleName] nvarchar(400) not null
        constraint [PK_Locales] primary key clustered
        (
            [LocaleID] asc
        ) on [primary]
    ) on [primary]

    print ''
    print '*************************************************************************************'  
    print 'Created table [dbo].[Locales]'
    print '*************************************************************************************'  
    print ''
end
else
begin
    print ''
    print '*************************************************************************************'  
    print 'Table [dbo].[Locales] already exists.'
    print '*************************************************************************************'  
    print ''
end
